﻿using DotNetCore.CAP;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ongoal.Quotation.Cap
{
    public class MessageNullPublisher : ICapPublisher
    {
        public IServiceProvider ServiceProvider{get{ return null; } }

        public ICapTransaction? Transaction { get { return null; } set { } }

        public void Publish<T>(string name, T? contentObj, string? callbackName = null)
        {
            
        }

        public void Publish<T>(string name, T? contentObj, IDictionary<string, string?> headers)
        {

        }

        public async Task PublishAsync<T>(string name, T? contentObj, string? callbackName = null, CancellationToken cancellationToken = default)
        {
            await Task.CompletedTask;
        }

        public async Task PublishAsync<T>(string name, T? contentObj, IDictionary<string, string?> headers, CancellationToken cancellationToken = default)
        {
            await Task.CompletedTask;
        }

        public void PublishDelay<T>(TimeSpan delayTime, string name, T? contentObj, IDictionary<string, string?> headers)
        {

        }

        public void PublishDelay<T>(TimeSpan delayTime, string name, T? contentObj, string? callbackName = null)
        {

        }

        public async Task PublishDelayAsync<T>(TimeSpan delayTime, string name, T? contentObj, IDictionary<string, string?> headers, CancellationToken cancellationToken = default)
        {
           await Task.CompletedTask;
        }

        public async Task PublishDelayAsync<T>(TimeSpan delayTime, string name, T? contentObj, string? callbackName = null, CancellationToken cancellationToken = default)
        {
            await Task.CompletedTask;
        }

        void ICapPublisher.Publish<T>(string name, T? contentObj, string? callbackName) where T : default
        {
            throw new NotImplementedException();
        }

        void ICapPublisher.Publish<T>(string name, T? contentObj, IDictionary<string, string?> headers) where T : default
        {
            throw new NotImplementedException();
        }

        Task ICapPublisher.PublishAsync<T>(string name, T? contentObj, string? callbackName, CancellationToken cancellationToken) where T : default
        {
            throw new NotImplementedException();
        }

        Task ICapPublisher.PublishAsync<T>(string name, T? contentObj, IDictionary<string, string?> headers, CancellationToken cancellationToken) where T : default
        {
            throw new NotImplementedException();
        }

        void ICapPublisher.PublishDelay<T>(TimeSpan delayTime, string name, T? contentObj, IDictionary<string, string?> headers) where T : default
        {
            throw new NotImplementedException();
        }

        void ICapPublisher.PublishDelay<T>(TimeSpan delayTime, string name, T? contentObj, string? callbackName) where T : default
        {
            throw new NotImplementedException();
        }

        Task ICapPublisher.PublishDelayAsync<T>(TimeSpan delayTime, string name, T? contentObj, IDictionary<string, string?> headers, CancellationToken cancellationToken) where T : default
        {
            throw new NotImplementedException();
        }

        Task ICapPublisher.PublishDelayAsync<T>(TimeSpan delayTime, string name, T? contentObj, string? callbackName, CancellationToken cancellationToken) where T : default
        {
            throw new NotImplementedException();
        }
    }
}
